package com.itheima.extendsdemo;

/**
 * 2025/4/12 10:35
 */
public class C extends B {
    public int c = 3;
    public String name = "王五";


    public void printName(){
        String name = "赵六";
        //打印局部变量name
        System.out.println(name);//赵六
        //打印C类的name
        System.out.println(this.name);//this->王五
        //打印继承过来的B类的name
        System.out.println(super.name);//李四
        //打印继承过来的A类的name(不支持这种语法)
//        System.out.println(super.super.name);

    }


}
